package com.baway.login.api

import com.baway.net.HttpRetrofitAnnotation
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Singleton


@Module //声明当前是一个Hilt模块
@InstallIn(SingletonComponent::class) //声明当前类的作用域是整个应用
object LoginHiltModel {

    @Provides
    @Singleton
    fun getHomeServerModel(@HttpRetrofitAnnotation retrofit: Retrofit): LoginApiServer{
        return retrofit.create(LoginApiServer::class.java)
    }

}